<template>
  <section>
    <div class="wrapper">
      <h2>会员管理</h2>
      <ul>
        <li v-if="isShow('AFMembership')" @click="$troute.query('AFMembership')">
          <p>会员注册</p>
          <span>Registered members</span>
        </li>

        <li v-if="isShow('memberLists')" @click="$troute.query('memberLists')" >
          <p>会员名册</p>
          <span>Register of members</span>
        </li>

        <li v-if="isShow('SLaborUnionAdmin')" @click="$troute.query('SLaborUnionAdmin')">
          <p>分工会管理</p>
          <span>Division of labor management</span>
        </li>

        <li v-if="!identity.moreThanThreeYears" @click="$troute.query('msIndex')">
          <p>补充医疗互助申请</p>
          <span>Mutual medical</span>
        </li>

      </ul>
    </div>
    <tabbar v-if="isHide" />
  </section>
</template>
<script>
import tabbar from "../../components/tabbar.vue";
import {mapState
} from "vuex";
export default {
  components: { tabbar },
  data (){
    return {
      identity:{},
      isHide:''
    }
  },
  mounted (){
    let str=this.$route.query.type;
    if(str==1){
        this.isHide=false
    }
    this.identity = JSON.parse(sessionStorage.getItem("jurisdiction"));
  },
  methods:{
    isShow:function (path){
      const show = this.menus.findIndex((value) => {
        return value == path
      })
      return show!=-1?true:false
    },
  },
  props:['title','aaa','run','home'],
  computed:{
    ...mapState({
      menus: "menus"
    }),
  }
};
</script>
<style lang="scss" scoped>
section {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 100%;
}

.wrapper {
  padding: 25px 20px;
  h2 {
    position: relative;
    font-size: 24px;
    margin-bottom: 25px;
    z-index: 1;
    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 1px;
      width: 96px;
      height: 5px;
      background-color: #c9151e;
      z-index: -1;
    }
  }
  ul li {
    margin-top: 20px;
    padding: 20px 20px 20px 80px;
    background: #fff url(../imgs/hygl-1.png) no-repeat 20px center;
    background-size: 50px;
    border-radius: 10px;
    box-shadow: 2px 2px 8px #f2f2f2, -2px -2px 8px #f2f2f2;
    p {
      position: relative;
      font-size: 18px;
      font-weight: bold;
      &::after {
        content: "";
        position: absolute;
        top: 15px;
        right: 0;
        width: 8px;
        height: 13px;
        background: url(../imgs/more.png) no-repeat;
        background-size: contain;
      }
    }
    span {
      color: #999;
      font-size: 12px;
    }
    &:nth-child(2) {
      background-image: url(../imgs/hygl-2.png);
    }
    &:nth-child(3) {
      background-image: url(../imgs/hygl-3.png);
    }
    &:nth-child(4) {
      background-image: url(../imgs/help-2.png);
    }
  }
}
</style>